package com.work.work2;
public class Test {
    public static void main(String[] args) {
        Animal rabbit = new Rabbit("美人","黑色","哺乳类");
        System.out.println(rabbit);
        rabbit.shout();
        rabbit.eat();
        System.out.println("--------------------------");
        Animal frog = new Frog("大兵","绿色","非哺乳类");
        System.out.println(frog);
        frog.eat();
        frog.shout();
        Swim frog2 = new Frog();
        frog2.Swim();

    }
}
